-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update table styles so nhsuk-table has bottom margin #1005
base: main
Are you sure you want to change the base?
Conversation
Might be worth opening a second PR to remove Do you know about this at all @anandamaryon1? |
Looks good to me, I've not seen the Perhaps leave it in for now. Based on this, the responsive table example will need both classes, so the block class adding too ( Note to self: will need to check service manual aligns. |
@@ -22,6 +22,16 @@ | |||
} | |||
} | |||
|
|||
.nhsuk-table { | |||
@include nhsuk-font($size: 19); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for adding this? Could this perhaps mess up any specific type styling that people may have added in their tables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It mirrors what GOV.UK do - providing some default sizing. I'd hope it wouldn't override any specific sizing as it should be less specific than any added by users. Not 100% confident about that though.
This fixes some inconsistency with the table styles.
The current table styles rely on a bottom margin being applied to the
table
element rather thannhsuk-table
. The responsive table variant resets this so it has no bottom margin.The styles include a
nhsuk-table-container
class that's presumably meant to wrap tables, but this is not used or documented on the design system site. I might guess it was added for a specific use case. For now I've left it, but teams shouldn't need to use it to get the correct bottom margin.This applies some basic styles to
nhsuk-table
similar to howgovuk-table
styles it. Ifnhsuk-table-container
can still be used.I think this should probably have no visual impact for most users. But if any had added extra margin to account for the responsive table not having margin, then that could double. It now sets the font too - which it's possible could conflict with a non standard font.